home *** CD-ROM | disk | FTP | other *** search
- /* $VER: 1.0, ©1996 Dietmar Eilert. Create empty list */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
- exit
-
- OPTIONS FAILAT 6 /* ignore warnings */
-
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
-
- 'QUERY DOC VAR=DOC'
-
- 'FIX VAR=DOC'
-
- 'SUFFIX STRING="' || DOC || '" SUFFIX=".html"'
-
- 'NAME NEW=' || RESULT
-
- 'REQUEST TITLE="Create new list" BODY="Choose a list type" BUTTON="!1. 2. 3.|· · ·|Text|_Cancel" VAR=TYPE'
-
- if ((RC = 0) & (RESULT ~= 0)) then do
-
- 'REQUEST TITLE="Create new list" LONG BODY="Number of list items..." MIN=1 MAX=255 VAR=ITEMS OLD=10'
-
- if (RC = 0) then do
-
- if (TYPE = 1) then
- MARKER = "OL"
-
- if (TYPE = 2) then
- MARKER = "UL"
-
- if (TYPE = 3) then
- MARKER = "DL"
-
- 'INSERT LINE'
- 'INSERT LINE'
- 'DOWN'
- 'TEXT STAY T="<' || MARKER || '>"'
- 'DOWN'
- 'INSERT LINE'
- 'TEXT STAY T="</' || MARKER || '>"'
-
- 'PING SLOT=0'
-
- do ITEM = 1 to ITEMS
-
- 'INSERT LINE'
-
- if (TYPE = 1) then
- 'TEXT STAY T="<LI> text"'
-
- if (TYPE = 2) then
- 'TEXT STAY T="<LI> text"'
-
- if (TYPE = 3) then do
-
- 'TEXT STAY T="<DT> term"'
- 'DOWN'
- 'INSERT LINE'
- 'TEXT STAY T="<DD> definition"'
- end
-
- 'DOWN'
- end
-
- 'PONG SLOT=0'
-
- 'GOTO STEP=5'
-
- 'REQUEST STATUS="Edit the list text"'
- end
- end
-
- /* ---------------------------- END OF YOUR CODE --------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
-
- exit
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
-
- 'UNLOCK'
-
- exit
-